package com.xuelang.pipeline.artifact.app.harborv2.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xiwen.zxg
 * @since 2024/7/11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ListArtifactQuery {
    /**
     * The page number
     */
    private Long page;
    /**
     * The size of per page
     */
    private Long pageSize;
    /**
     * Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy
     * match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and
     * "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be
     * string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of
     * these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g.
     * q=k1=v1,k2=~v2,k3=[min~max]
     */
    private String q;
    /**
     * Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending
     * order and field2 in descending order with "sort=field1,-field2"
     */
    private String sort;
    /**
     * Specify whether the accessories are included of the returning artifacts. Only works when
     * setting "with_accessory=true"
     */
    private Boolean withAccessory;
    /**
     * Specify whether the immutable status is included inside the tags of the returning
     * artifacts. Only works when setting "with_immutable_status=true"
     */
    private Boolean withImmutableStatus;
    /**
     * Specify whether the labels are included inside the returning artifacts
     */
    private Boolean withLabel;
    /**
     * Specify whether the SBOM overview is included in returning artifacts, when this option is
     * true, the SBOM overview will be included in the response
     */
    private Boolean withSbomOverview;
    /**
     * Specify whether the scan overview is included inside the returning artifacts
     */
    private Boolean withScanOverview;
    /**
     * Specify whether the signature is included inside the tags of the returning artifacts.
     * Only works when setting "with_tag=true"
     */
    private Boolean withSignature;
    /**
     * Specify whether the tags are included inside the returning artifacts
     */
    private Boolean withTag;
}
